<?php

namespace App\Providers;

use App\Models\Admin;
use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Contracts\Auth\Authenticatable as UserContract;

class AdminEloquentUserProvider extends EloquentUserProvider
{
    
    public function validateCredentials(UserContract $user, array $credentials)
    {
        //判断是否禁用账户
//        if($user->status != Admin::STATUS_YES)
//        {
//            return false;
//        }
        dd($user,$credentials);
        //验证密码改为验证boss接口
//        list('username' => $username , 'password' => $password, 'tenant_id' => $tenant_id) = $credentials;
//        $result = app('boss')->login($credentials['username'],$credentials['password'],$credentials['tenant_id']);
        return true;//$result->code == 1000;
    }

}
